const Router = require('koa-router')
const router = new Router()
const BaseController = require('../../controller/base')

router.get('/', async (ctx, next) => {
  ctx.body = { code: 200, data: 'Hello, World!' }
  await next()
})

router.get('/healthy', async (ctx, next) => {
  ctx.body = { code: 200, data: '/healthy' }
  await next()
})

router.get('/login-log', async (ctx, next) => {
  ctx.body = { code: 200, data: '/login-log' }
  await next()
})

router.get('/operation-log', async (ctx, next) => {
  ctx.body = { code: 200, data: '/operation-log' }
  await next()
})


router.get('/system-info', BaseController.getSystemInfo)

router.get('/redis-info', BaseController.getRedisInfo)

module.exports = router
